home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Ahoy 1986 March
/
Ahoy_Magazine_86-03_1986_Double_L.d64
/
programmer's aid
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-10-26
|
2KB
|
46 lines
60000 print"[147]"tab(11)" programmer's aid [146]"
60002 print"run60040":print" this provides a screen listing"
60004 print" showing the line numbers of the"
60006 print" program and their memory locations."
60008 print"run60060":print" this automatically deletes all"
60010 print" lines in the program which begin with"
60012 print" rem or a colon."
60014 print"run60070":print" this deletes all lines between two "
60016 print" line numbers (inclusive), which you"
60018 print" will be asked to enter.":print
60020 print" subroutines may be activated by"
60022 print" placing the cursor on the above lines"
60024 print" and hitting return. to erase the"
60026 print" entire subroutine, use the delete line"
60028 print" with[146] 59999 as low line #,[146] 60076 as"
60030 print" high. when the program stops enter"
60032 print" 'run60100' and hit return.";:end
60040 dimlx(500),nx(500):n=1:nx(n)=2049:print"[147]reading program....."
60042 nx(n+1)=peek(nx(n))+256*(peek(nx(n)+1))
60044 lx(n)=peek(nx(n)+2)+256*(peek(nx(n)+3))
60046 ifnx(n+1)=0then60050
60048 n=n+1:goto60042
60050 gosub60058:fori=1ton-1:printlx(i);tab(9);nx(i)
60052 ifi/18=int(i/18)thengosub60056
60054 nexti:end
60056 print"any key to continue";:poke198,0:wait198,1:getz$
60058 print"[147]line # mem loc":print"[163][163][163][163][163][163] [163][163][163][163][163][163][163]":return
60060 print"[147]reading program...":poke251,(peek(43)):poke252,(peek(44))
60062 v=256:pl=peek(251)+v*(peek(252)):l=peek(pl):h=peek(pl+1):ifpl=0thenend
60064 x=(peek(pl+4)):ifx<>143andx<>58thenpoke251,l:poke252,h:goto60062
60066 ln=peek(pl+2)+v*(peek(pl+3)):print"[147]";ln:print"goto60062":poke631,13
60068 poke632,13:poke633,13:poke198,3:print"";:end
60070 print"[147]delete from[146]":input"low line #";bl:print"to":input"high line #";el
60072 print"[147]reading program....."
60074 v=256:h%=bl/v:l%=bl-h%*v:poke828,l%:poke829,h%
60076 h%=el/v:l%=el-h%*v:poke830,l%:poke831,h%:poke832,peek(43):poke833,peek(44)
60086 v=256:bl=peek(828)+v*(peek(829)):el=peek(830)+v*(peek(831))
60088 pl=peek(832)+v*(peek(833))
60090 nl=peek(pl)+v*(peek(pl+1)):ln=peek(pl+2)+v*(peek(pl+3))
60092 ifln<blthenpl=nl:goto60090
60094 ifln>elorln=0thenend
60096 h%=pl/256:l%=pl-256*h%:poke832,l%:poke833,h%:print"[147]";ln
60098 print"run60086":fori=631to633:pokei,13:nexti:poke198,3:print"";:end
60100 print"[147]";:fori=60086to60102step2:printi:next:poke631,19:fori=632to640
60102 pokei,13:next:poke198,10:end